<script>
	import api from '@/api/login.js';
	export default {
		onLaunch: async () => {
			try {
				if (!!uni.getStorageSync("Authorization")) {					
					let {
						status
					} = await api.CheckStatus()
					
					if (status) {
						uni.switchTab({
							url: '/pages/ListContainers/ListContainers',
						});
					}
				} else {
					uni.redirectTo({
						url: '/pages/Login/Login',						
					});
				}
			} catch (e) {
				debugger
				console.log(e)
			}
		}
	}
</script>

<style>
	@import url('@/static/styles/uni.css');
</style>